}
_addTransition(oldState, newState, wallTimeSecs,
- {recalculateState = true} = {}) {
+ {recalculateState = true, debugLog = true} = {}) {
this._stateTransitions.push({
oldState,
newState,
this._userState = newState;
- console.debug('TimeLimitsManager: User state changed from ' +
- `${userStateToString(oldState)} to ${userStateToString(newState)} at ${wallTimeSecs}s`);
+ if (debugLog) {
+ console.debug('TimeLimitsManager: User state changed from ' +
+ `${userStateToString(oldState)} to ${userStateToString(newState)} at ${wallTimeSecs}s`);
+ }
// This potentially changed the limit time and timeout calculations.
if (recalculateState && this._state !== TimeLimitsState.DISABLED) {
entry['newState'],
entry['wallTimeSecs'], {
recalculateState: i === history.length - 1,
+ debugLog: false,
});
previousWallTimeSecs = entry['wallTimeSecs'];
}
+ console.debug(`TimeLimitsManager: Loaded ${history.length} transitions from history`);
+
this.thaw_notify();
}